<template>
  <div>

    <template v-if="getCurrentPath == 'dsp' && $route.path.split('/')[2] == 'upArticle'">
      <fabu-header></fabu-header>
    </template>

    <template v-if="getCurrentPath == 'banquan'">
      <banquanheader></banquanheader>
    </template>

    <template v-else-if="getCurrentPath == 'dsp'">
      <dsp-header></dsp-header>
    </template>

    <template v-else-if="getCurrentPath == 'lyrics'">
      <LyricsHeader></LyricsHeader>
    </template>

    <template v-else>
<!--      <Header></Header>-->
      <header2></header2>
    </template>

    <div>
      <router-view></router-view>
      <Footer></Footer>
    </div>

  </div>
</template>

<script>
import Header from './pages/common/header'
import header2 from "./pages/common/header2";
import LyricsHeader from './pages/common/lyricsHeader'
import Footer from './pages/common/footer'
import dspHeader from "./pages/dsp/components/dspHeader";
import fabuHeader from "./pages/dsp/components/fa_bu_header";
import banquanheader from './pages/ban_quan_jiao_yi/header'
export default {
  name: 'App',
  components: {
    Header,Footer,dspHeader,LyricsHeader,fabuHeader,banquanheader,header2
  },
  computed:{
      getCurrentPath(){
        return this.$route.path.split('/')[1]
      }
  },
  watch:{
    $route(to,form) {

      //监听路由变化
      console.log(this.$route.path.split('/')[1]);

    },
  },
}
</script>

<style>
html{
  background: #F3F3F3;
}
body{
  margin: 0;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>

